﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductList.ascx.cs" Inherits="PrototypeUserControl.ProductList1" %>
<%@ Register src="wucProduct.ascx" tagname="wucproduct" tagprefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:DataList ID="dtlist" runat="server" Width="100%" onitemcommand="dtlist_ItemCommand">
    <FooterTemplate>
        <div style="border-top: 1px solid #555">
            <asp:Button ID="btnNew" CssClass="btnNew" runat="server" CommandName="NewRegister" Text="New Product" />
            <uc1:wucProduct ID="wucProduct1" runat="server" Visible="False" />
        </div>
    </FooterTemplate>
    <HeaderTemplate>
        <table cellpadding="0" cellspacing="0" style="width: 100%; background: #28618A; color: #fff; font-weight: bold;">
            <tr>
                <td style="width: 5%">
                </td>
                <td style="width: 5%">
                </td>
                <td style="width: 10%">
                    ID
                </td>
                <td style="width: 40%">
                    NAME
                </td>
                <td style="width: 25%">
                    UNITS
                </td>
                <td style="width: 25%">
                    SUPPLIER
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table cellpadding="0" cellspacing="0" style="width: 100%; background: #AECFE8">
            <tr>
                <td style="width: 5%; text-align: center;">
                    <asp:ImageButton ID="imgbtnEdit" ImageUrl="img/imgEdit.png" runat="server" Style="width: 25px" ToolTip="Edit item" CommandName="Edit" />
                </td>
                <td style="width: 5%; text-align: center;">
                    <asp:ImageButton ID="imgbtnRemove" ImageUrl="img/imgDelete.png" runat="server" Style="width: 25px" ToolTip="Remove item" CommandName="Remove" />
                    <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText="Are you sure you want to delete this?" TargetControlID="imgbtnRemove">
                    </asp:ConfirmButtonExtender>
                </td>
                <td style="width: 10%">
                    <asp:Label ID="lblID" runat="server" Text='<%# Eval("idProducts") %>'></asp:Label>
                </td>
                <td style="width: 40%">
                    <asp:Label ID="lblName" runat="server" Text='<%# Eval("name") %>'></asp:Label>
                </td>
                <td style="width: 25%">
                    <asp:Label ID="lblUnits" runat="server" Text='<%# Eval("units") %>'></asp:Label>
                </td>
                <td style="width: 25%">
                    <asp:Label ID="lblSupplier" runat="server" Text='<%# Eval("supplier") %>'></asp:Label>
                </td>
            </tr>
        </table>
        <uc1:wucProduct ID="wucProduct1" runat="server" Visible="False" />
    </ItemTemplate>
</asp:DataList>

<asp:DataList ID="DataList1" runat="server">
    <ItemTemplate>
        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
        <asp:Button ID="Button1" runat="server" CommandName="comando" Text="Button" />
    </ItemTemplate>
</asp:DataList>


